<#ftl strip_whitespace=true >
package ${daoPackageName!};

import ${entityPackageName}.${name};
import java.util.List;
<#list importedTypes as type>
import ${type};
</#list>

public interface ${daoName} {

	public static final String SERVICE_NAME = "${daoName}";
	
	public ${name} create${name}(<#list mandatoryAttributeList as attr>${attr.type} ${attr.name}<#if attr_has_next>, </#if></#list>);
	
	public ${name} findById(Long id);
	
	public List<${name}> findAll();
	
	public void store(${name} co);
	
	public void store(List<${name}> l);
	
	public void delete(${name} co);
	
	<#list attributes as attribute>
		<#if !(attribute.calculatedValue??) && !(attribute.identifier)>
	/** 
	* finders for single attribute '${attribute.name}'
	*/
			<#if attribute.unique>
	public ${name} findBy${attribute.nameCapitalized}(${attribute.shortTypeName} val);
			<#else>
	public List<${name}> findBy${attribute.nameCapitalized}(${attribute.shortTypeName} val);
			</#if>
		</#if>
	</#list>
	<#list uniqueConstraints as uc>
	/**
	* finder based on unique constraint
	*/
	public ${name} findBy<#list uc.attributes as attr>${attr.nameCapitalized}</#list>(<#list uc.attributes as attr>${attr.type} ${attr.name}<#if attr_has_next>, </#if></#list>);

	</#list>
	<#list finders as finder>
	/**
	* user defined finder
	*/
	public <#if finder.typeMany>List<${name}><#else>${name}</#if> ${finder.name}(<#list finder.finderOperations as fo>${fo.attribute.type} ${fo.paramName}<#if fo_has_next>, </#if></#list><#if finder.typeMany && finder.limited><#if !finder.emptyFinderOperationList>, </#if>int maxRowCount</#if>);

	</#list>
}